# $Id: PKGBUILD 90074 2013-05-06 19:38:57Z foutrelis $
# Maintainer: Vesa Kaihlavirta <vegai@iki.fi>

pkgname=openttd
pkgver=1.3.0
pkgrel=2
pkgdesc='An engine for running Transport Tycoon Deluxe.'
arch=('i686' 'x86_64')
url='http://www.openttd.org'
license=('GPL')
depends=('libpng' 'sdl' 'icu' 'fontconfig' 'lzo2' 'hicolor-icon-theme' 'desktop-file-utils' 'xz')
install=openttd.install
optdepends=('openttd-opengfx: free graphics' 
            'openttd-opensfx: free soundset')
source=("http://binaries.openttd.org/releases/${pkgver}/${pkgname}-${pkgver}-source.tar.xz")
sha256sums=('1a3525186f4486de8193992426690a1fd8c7e4d376a328056b0464a1a5d32080')

package() {
  cd ${pkgname}-${pkgver} 

 ./configure \
    --prefix-dir=/usr \
    --binary-name=${pkgname} \
    --binary-dir=bin \
    --data-dir=share/${pkgname} \
    --install-dir=${pkgdir} \
    --doc-dir=share/doc/${pkgname} \
    --menu-name="OpenTTD" \
    --personal-dir=.${pkgname}    

  make
  make install
}
